package com.ruoyi.iot.service;

import cn.hutool.core.util.IdUtil;
import com.ruoyi.iot.domain.YcDeviceData;
import com.ruoyi.iot.mapper.IotDeviceDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class IotDeviceDataService {
    @Autowired
    private IotDeviceDataMapper iotDeviceDataMapper;

    public void insertDeviceData(YcDeviceData deviceData) {
        deviceData.setId(IdUtil.getSnowflakeNextId());
        iotDeviceDataMapper.insertDeviceData(deviceData);
    }
}
